/* eslint-disable no-console */
import { DatabaseTypes, DbmOptions, DbmService } from '../../src'
import { FileHelper } from '../../src/lib/utils/fileHelper'

const path = require('path')

const options = new DbmOptions()

options.database = DatabaseTypes.mariadb
options.sourceFolder = path.join(__dirname, `../data/mariadb/tables`)

const sql = DbmService.toDropThenCreateTableSql(options)
FileHelper.writeFileSync(path.join(__dirname, `../../temp/demo.sql`), sql)

const json = DbmService.toJson(options)
FileHelper.writeFileSync(path.join(__dirname, `../../temp/demo.json`), json)
